package User;

import Operate.Login;
import com.sun.org.apache.xpath.internal.operations.Operation;

import java.io.IOException;
import java.io.FileWriter;

//用文件流存放用户信息
public class User {
    public static void user(String username, String password) {
        try {
            FileWriter fileWriter = new FileWriter("UserInformation", true);
            fileWriter.write(username + "," + password + System.lineSeparator());
            fileWriter.close();
            System.out.println("用户账号和密码已存储成功！");
            Login.login();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
